# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Maintainer:
pkgname=luakit
pkgver=2.3
pkgrel=1
pkgdesc="Fast, small, webkit based browser framework extensible by Lua"
url="https://luakit.github.io/"
# armv7: fails to build
# s390x: install fails
# riscv64: no luajit
arch="all !armv7 !s390x !riscv64"
license="GPL-3.0-or-later"
depends="gsettings-desktop-schemas lua5.1-filesystem"
makedepends="webkit2gtk-dev luajit-dev"
checkdepends="xvfb luacheck lua5.1-luassert"
options="!check" #fixme
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/luakit/luakit/archive/$pkgver.tar.gz
	"

build() {
	make PREFIX=/usr USE_LUAJIT=1 DEVELOPMENT_PATHS=0
}

check() {
	make run-tests
}

package() {
	make PREFIX=/usr DESTDIR="$pkgdir" install
	mkdir -p "$pkgdir"/usr/share/doc/"$pkgname"
	mv "$pkgdir"/usr/share/"$pkgname"/doc/* "$pkgdir"/usr/share/doc/"$pkgname"
	rmdir "$pkgdir"/usr/share/"$pkgname"/doc
}

sha512sums="f41121e1c47c020d90fe69f858b8c348f5c3ad752891abf2b94e5b44eebe3d5c8c315342c9aa4c53bbaef548f6ef2a1d0c522d877f0a20516734755967c0bb5c  luakit-2.3.tar.gz"
